import Vue from 'vue'
import VueRouter from 'vue-router'
import login from '../views/login.vue'
import my from '../views/my.vue'
import detail from '../views/detail.vue'
import share from '../views/share.vue'
import myshare from '../views/myshare.vue'


Vue.use(VueRouter)

const routes = [

    {
        path: '/',
        name: 'login',
        component: login
    },
    {
        path: '/my',
        name: 'my',
        component: my
    },
    {
        path: '/detail',
        name: 'detail',
        component: detail
    },
    {
        path: '/share',
        name: 'share',
        component: share
    },
    {
        path: '/myshare',
        name: 'myshare',
        component: myshare
    }
]

//history  hash
const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
